package org.jcut.bean;

import java.io.Serializable;
import java.util.Date;

import javax.validation.constraints.NotNull;

import org.springframework.format.annotation.DateTimeFormat;

import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * orderform
 * @author 
 */
public class Orderform implements Serializable {
 
    @Override
	public String toString() {
		StringBuilder builder = new StringBuilder();
		builder.append("Orderform [id=");
		builder.append(id);
		builder.append(", timg=");
		builder.append(timg);
		builder.append(", commodity=");
		builder.append(commodity);
		builder.append(", uId=");
		builder.append(uId);
		builder.append(", adress=");
		builder.append(adress);
		builder.append(", cId=");
		builder.append(cId);
		builder.append(", cNum=");
		builder.append(cNum);
		builder.append(", oPrice=");
		builder.append(oPrice);
		builder.append(", time=");
		builder.append(time);
		builder.append(", dis=");
		builder.append(dis);
		builder.append(", oStay=");
		builder.append(oStay);
		builder.append(", express=");
		builder.append(express);
		builder.append(", payType=");
		builder.append(payType);
		builder.append("]");
		return builder.toString();
	}

	/**
     * 订单id
     */
	private String myNum;
	private String myPrice;
    private String id;
    private TImg timg;
    private Commodity commodity;

    /**
     * 用户id
     */
    @NotNull(message = "用户id不能为空")
    private String uId;

    /**
     * 地址
     */
    @NotNull(message = "收货地址不能为空")
    private String adress;
    @NotNull(message = "商品id不能为空")
    private String cId;

    /**
     * 购买数量
     */
    @NotNull(message = "购买数量不能为空")
    private Integer cNum;

    /**
     * 商品总金额
     */
    @NotNull(message = "商品金额不能为空")
    private Double oPrice;

    /**
     * 购买时间
     */
    @DateTimeFormat(pattern ="yyyy-MM-dd HH:mm:ss" )
   	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date time;

    /**
     * 当前状态
     */
    private Integer dis;

    /**
     * 订单留言
     */
    private String oStay;

    /**
     * 快递类别
     */
    @NotNull(message = "快递类别不能为空")
    private String express;

    /**
     * 支付方式
     */
    @NotNull(message = "支付方式不能为空")
    private String payType;

    private static final long serialVersionUID = 1L;

  

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getuId() {
        return uId;
    }

    public void setuId(String uId) {
        this.uId = uId;
    }

    public String getAdress() {
        return adress;
    }

    public void setAdress(String adress) {
        this.adress = adress;
    }

    public String getcId() {
        return cId;
    }

    public void setcId(String cId) {
        this.cId = cId;
    }

    public Integer getcNum() {
        return cNum;
    }

    public void setcNum(Integer cNum) {
        this.cNum = cNum;
    }

    public Double getoPrice() {
        return oPrice;
    }

    public void setoPrice(Double oPrice) {
        this.oPrice = oPrice;
    }

    public Date getTime() {
        return time;
    }

    public void setTime(Date time) {
        this.time = time;
    }

    public Integer getDis() {
        return dis;
    }

    public void setDis(Integer dis) {
        this.dis = dis;
    }

    public String getoStay() {
        return oStay;
    }

    public void setoStay(String oStay) {
        this.oStay = oStay;
    }

    public String getExpress() {
        return express;
    }

    public void setExpress(String express) {
        this.express = express;
    }

    public String getPayType() {
        return payType;
    }

    public void setPayType(String payType) {
        this.payType = payType;
    }

	public TImg getTimg() {
		return timg;
	}

	public void setTimg(TImg timg) {
		this.timg = timg;
	}

	public Commodity getCommodity() {
		return commodity;
	}

	public void setCommodity(Commodity commodity) {
		this.commodity = commodity;
	}

	public String getMyPrice() {
		return myPrice;
	}

	public void setMyPrice(String myPrice) {
		this.myPrice = myPrice;
	}

	public String getMyNum() {
		return myNum;
	}

	public void setMyNum(String myNum) {
		this.myNum = myNum;
	}




}